<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="cc.geguo.bean.Student" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/2/9
  Time: 9:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>内置标签</title>
</head>
<body>
<%
    //转发
//    request.getRequestDispatcher("").forward(request,response);
%>
<%--<jsp:forward page="/demo/09.action2.jsp">
    <jsp:param name="name" value="name"/>
</jsp:forward>--%>
<jsp:include page="header.jsp"/>
我是内容

<%
    List<Student> list = new ArrayList<>();
    for (int i = 0; i < 6; i++) {
        Student student = new Student("name",i);
        list.add(student);
    }
    Map<String,Student> map = new HashMap<>();
    map.put("geguo",new Student("geguo",25));
    pageContext.setAttribute("list",list);
    pageContext.setAttribute("map",map);

%>

${list[0].age} <br>
${list[1].age} <br>
${list[2].age} <br>
${list[3].age} <br>

<h2>map</h2>
${empty map["key"]} <br>
${map["geguo"].name}

</body>
</html>
